added a default method for the add virtual method of GtkContainer.
authorLorenzo Gil Sanchez <lgs@src.gnome.org>
Mon, 5 Jul 2004 15:44:58 +0000 (15:44 +0000)
committerLorenzo Gil Sanchez <lgs@src.gnome.org>
Mon, 5 Jul 2004 15:44:58 +0000 (15:44 +0000)
* gtk/gtklayout.c (gtk_layout_add): added a default method for the add
virtual method of GtkContainer.
(gtk_layout_class_init): assign gtk_layout_add to the 'add' virtual
method slot of the container class.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtklayout.c

index f66357e719a302806492096188f73b280abcff85..ec334577b6f887131406cb360bc4eeee1d270b1a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-05  Lorenzo Gil Sanchez  <lgs@sicem.biz>
+
+       * gtk/gtklayout.c (gtk_layout_add): added a default method for the add
+       virtual method of GtkContainer.
+       (gtk_layout_class_init): assign gtk_layout_add to the 'add' virtual
+       method slot of the container class.
+
 2004-07-05  Anders Carlsson  <andersca@gnome.org>
 
        * gtk/gtkiconview.c: (gtk_icon_view_set_markup_column):
index f66357e719a302806492096188f73b280abcff85..ec334577b6f887131406cb360bc4eeee1d270b1a 100644 (file)
@@ -1,3 +1,10 @@
+2004-07-05  Lorenzo Gil Sanchez  <lgs@sicem.biz>
+
+       * gtk/gtklayout.c (gtk_layout_add): added a default method for the add
+       virtual method of GtkContainer.
+       (gtk_layout_class_init): assign gtk_layout_add to the 'add' virtual
+       method slot of the container class.
+
 2004-07-05  Anders Carlsson  <andersca@gnome.org>
 
        * gtk/gtkiconview.c: (gtk_icon_view_set_markup_column):
index f66357e719a302806492096188f73b280abcff85..ec334577b6f887131406cb360bc4eeee1d270b1a 100644 (file)
@@ -1,3 +1,10 @@
+2004-07-05  Lorenzo Gil Sanchez  <lgs@sicem.biz>
+
+       * gtk/gtklayout.c (gtk_layout_add): added a default method for the add
+       virtual method of GtkContainer.
+       (gtk_layout_class_init): assign gtk_layout_add to the 'add' virtual
+       method slot of the container class.
+
 2004-07-05  Anders Carlsson  <andersca@gnome.org>
 
        * gtk/gtkiconview.c: (gtk_icon_view_set_markup_column):
index f66357e719a302806492096188f73b280abcff85..ec334577b6f887131406cb360bc4eeee1d270b1a 100644 (file)
@@ -1,3 +1,10 @@
+2004-07-05  Lorenzo Gil Sanchez  <lgs@sicem.biz>
+
+       * gtk/gtklayout.c (gtk_layout_add): added a default method for the add
+       virtual method of GtkContainer.
+       (gtk_layout_class_init): assign gtk_layout_add to the 'add' virtual
+       method slot of the container class.
+
 2004-07-05  Anders Carlsson  <andersca@gnome.org>
 
        * gtk/gtkiconview.c: (gtk_icon_view_set_markup_column):
index e05038d77dacace966f282ce53f9490e59ad8c59..8e40f47406b7fd3ea8fcc2ff04eb2164e98d97ba 100644 (file)
@@ -81,6 +81,8 @@ static void gtk_layout_size_allocate      (GtkWidget      *widget,
                                            GtkAllocation  *allocation);
 static gint gtk_layout_expose             (GtkWidget      *widget,
                                            GdkEventExpose *event);
+static void gtk_layout_add                (GtkContainer   *container,
+                                          GtkWidget      *widget);
 static void gtk_layout_remove             (GtkContainer   *container,
                                            GtkWidget      *widget);
 static void gtk_layout_forall             (GtkContainer   *container,
@@ -468,7 +470,7 @@ gtk_layout_set_size (GtkLayout     *layout,
   GtkWidget *widget;
   
   g_return_if_fail (GTK_IS_LAYOUT (layout));
-
+  
   widget = GTK_WIDGET (layout);
   
   g_object_freeze_notify (G_OBJECT (layout));
@@ -668,6 +670,7 @@ gtk_layout_class_init (GtkLayoutClass *class)
   widget_class->expose_event = gtk_layout_expose;
   widget_class->style_set = gtk_layout_style_set;
 
+  container_class->add = gtk_layout_add;
   container_class->remove = gtk_layout_remove;
   container_class->forall = gtk_layout_forall;
 
@@ -1047,8 +1050,15 @@ gtk_layout_expose (GtkWidget *widget, GdkEventExpose *event)
   return FALSE;
 }
 
-/* Container method
+/* Container methods
  */
+static void
+gtk_layout_add (GtkContainer *container,
+               GtkWidget    *widget)
+{
+  gtk_layout_put (GTK_LAYOUT (container), widget, 0, 0);
+}
+
 static void
 gtk_layout_remove (GtkContainer *container, 
                   GtkWidget    *widget)